#pragma once
#include "nnse_support.h"

namespace nnse
{
	template <class T, class U> public ref class problem : public problem_solver_core<U>
	{
		// Constructor and Destructor
			public: problem();
			protected: virtual ~problem();
		// Member Variables and their Accessor Functions
			// file - the name of the file last loaded or saved
				private: System::String^ file_drive;
				private: System::String^ file_dir;
				private: System::String^ file_name;
				private: System::String^ file_ext;
				public: System::String^ get_file();
				public: System::String^ get_file_name();
				public: System::String^ get_file_ext();
				protected: void put_file(System::String^ f_s);
			// problem_solver - the solver associated with this problem
				private: solver<T, U>^ problem_solver;
				public: solver<T, U>% get_solver();
				public: void put_solver();
			// problem_form - the problem's user interface
				protected: SimpleGUI::Problem<T, U>^ problem_form;
		// Worker Functions
			public: void load(System::String^ f_s);
			public: void save(System::String^ f_s);
			public: void create();
			private: void read_header(std::ifstream& file_stream);
			private: void write_header(std::ofstream& file_stream);
			private: void read_data(std::ifstream& file_stream);
			private: void write_data(std::ofstream& file_stream);
			private: void read_part_data(std::ifstream& file_stream);
			private: void write_part_data(std::ofstream& file_stream, const char* description);
	};
}
